Skip to content

graphql: Add a query test#6004

Merged
lutter merged 1 commit intomasterfrom
lutter/pl-good
May 15, 2025
Merged

graphql: Add a query test#6004
lutter merged 1 commit intomasterfrom
lutter/pl-good

Conversation

@lutter
Copy link
Collaborator

@lutter lutter commented May 14, 2025

Check the situation where an entity that has empty relations to other entities is followed by one that does have them and ensure that we link up the children correctly in that situation.

Found this change cleaning up old branches, but don't remember what prompted writing it. But another test won't hurt either way

@lutter lutter requested a review from incrypto32 May 14, 2025 20:10
@lutter lutter self-assigned this May 14, 2025
Copy link
Member

@incrypto32 incrypto32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! apart from the accidental rename of can_filter_by_relationship_fields


#[test]
fn can_filter_by_relationship_fields() {
fn c_by_relationship_fields() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed by mistake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops .. yes, nice catch

Comment on lines +3079 to +3081
/// Check that if we have entities where a related entity is null, followed
/// by one where it is not null that the children are joined correctly to
/// their respective parent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curios, why a null would cause an issue, Was there a bug that recently got fixed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, I don't remember why I wrote that test, and it passed for me on master on the first try. I just figured it doesn't hurt to have this test either way

Check the situation where an entity that has empty relations to other
entities is followed by one that does have them and ensure that we link up
the children correctly in that situation.
@lutter lutter merged commit 6df8277 into master May 15, 2025
5 checks passed
@lutter lutter deleted the lutter/pl-good branch May 15, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants